/**
* Created by admin on 18-4-7.
*/
<template>
	<section class="orderBox">
    <el-row>
      <div class="one-title">图片上传</div>
      <el-upload
        action="api/check/registerOrginzerCheck"
        :data = "upLoadData"
        name = "file"
        list-type="picture-card"
        :file-list="picList"
        :on-preview="handlePictureCardPreview"
        :on-success="uploadSuccess"
        :on-remove="handleRemove">
        <i class="el-icon-plus"></i>
      </el-upload>
      <el-dialog :visible.sync="dialogVisible">
        <img width="100%" :src="dialogImageUrl" alt="">
      </el-dialog>
    </el-row>
    <div class="divid-line"></div>
    <el-row>
      <div class="one-title">附件上传</div>
      <el-upload
        class="upload-demo"
        ref="upload"
        name="file"
        :data = "upLoadData"
        action="api/check/registerOrginzerCheck"
        :on-preview="handlePreview"
        :on-remove="handleRemove"
        :file-list="fileList"
        :auto-upload="false">
        <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
        <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">开始上传</el-button>
        <div slot="tip" class="el-upload__tip"></div>
      </el-upload>
    </el-row>
  </section>
</template>
<script>

  import DataUtil from '../../common/dataUtil'
  export default {
    data() {
      return {
        dialogImageUrl: '',
        dialogVisible: false,
        upLoadData: {
          userId: DataUtil.id()
        },
        fileName:"",
        fileList:[

        ],
        picList:[],
      };
    },
    methods: {
      handleRemove(file) {
          this.fileName = file.name;
        this.$http.post('check/deleteOrginzeData',{"fileName": this.fileName});
      },
      handlePictureCardPreview(file) {
        this.dialogImageUrl = file.url;
        this.dialogVisible = true;
      },
      uploadSuccess(response) {
          if (response.code == 1) {
              this.fileName = response.data;
          }
      },
      submitUpload() {
        this.$refs.upload.submit();
      },
      getAllCheckData() {
          this.$http.post('check/getAllOrginzeData', {userId: DataUtil.id(), type: 1, fileType: 1}).then(response => {
              if (response.body.code == 1) {
                  this.picList = response.body.data;
              }
          });
        this.$http.post('check/getAllOrginzeData', {userId: DataUtil.id(), type: 1, fileType: 2}).then(response => {
          if (response.body.code == 1) {
            this.fileList = response.body.data;
          }
        });
      },
    },
    mounted() {
      this.getAllCheckData();
   }
 }

 </script>
<style>
  .v-note-edit {
    display: none;
  }
  .v-note-panel .v-note-show {
    flex: 0 0 100% !important;
  }
  .reviewTable {
    width: 80%;
    border-spacing: 0;
    border: 1px solid gray;
    margin: 20px auto;
  }
  .reviewTable td {
    text-align: center;
    border: 1px solid gray;
    height: 40px;
    line-height: 40px;

    width: 50%;
    word-wrap:break-word;
  }
  .videos {
    width: 80%;
    margin: 20px auto;
  }
  /*侧边框布局*/
  .containers {
    width: 100%;
    /*height: 400px;*/
    display: flex;

  }
  .containers .asides {
    flex: 6;

  }
  .containers .mains {
    flex: 4;
    margin-left: 40px;
  }
  .other_remark {
    width: 100%;
  }
  .mains .smallRemark {
    width: 100%;
  }
  .asides table {
    border-spacing: 0;
    border: 1px solid #A9A9A9 ;
    border-radius: 2px;
  }
  .asides table td {
    border: .5px solid #efefef;
    word-wrap:break-word;
    line-height: 20px;
    padding: 5px;
  }
  table td img {
    width: 100%;
  }
  .aside_title {
    font-weight: 400;
    line-height: 40px;
    font-size: 16px;
  }
  .question_radio {
    padding-bottom: 30px;
    margin: 5px 10px;
  }
  .question_radio .radio_box {
    /*margin-bottom: -30px;*/
    line-height: 20px;
    float: right;
  }
  .addreBook {
    text-align: center;
    width: 40px;
  }
  /* 标题 */
  .main-title{
    font-size: 22px;
    margin-top: -15px;
    margin-bottom: 15px;
  }
  .one-title{
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 7px;
  }
  .two-title{
    font-size: 13px;
    color: #888;
    margin: 10px 0
  }
  .subtitle{
    font-size: 13px;
    color: #888;
  }
  .orderBox .el-row {
    margin: 15px 30px;
  }
  .orderBox .el-col span{
    margin-right: 10px;
  }
  .orderBox .el-button span,.orderBox .el-tag span{
    margin-right: 0;
  }
  .orderBox .box-card .el-button{
    margin-right: 5px;
  }
  .orderBox .grid-content {
    line-height: 28px;
  }

  .divid-line{
    height: 10px;
    background: #f1f2f7;
  }
  /*借款信息*/
  .loanDetail{
    margin: 0 30px 15px;
    width: 94%;
    max-height:250px;
  }
  /*依图识别*/
  .yituInfo{
    display: block;
    text-align: center;
    margin-top: 10px;
  }
  /*征信*/
  .orderBox .box-card{
    height: 225px;
  }
  .JXLBox{
    border: 1px solid #ccc;
    padding: 10px
  }
  .JXLBox div{
    padding: 5px;
  }

  .orderBox .el-table .info-row {
    background: #e2f0e4;
  }

  .orderBox .el-table .red-row{
    background: #F33;
  }
  .redInfo{
    color: #F33;
  }

  .line-height .el-col{
    margin-bottom: 10px;
  }
  .faceCheck {
    margin: 0 auto;
    overflow: hidden;
  }
  .faceCheck .faceImg{
    width: 45%;
    height: 350px;
    overflow: hidden;
    margin: 1.5%;
    float: left;
    text-align: center;
  }
  .faceCheck .faceImg img {
    margin: 0 auto;
    display: block;
    width: 90%;
    height: 90%;
    /*    border: .5px solid #F1F2F7;
    border-radius: 5px;*/
  }
  .faceImgTop {
    width: 45%;
    height: 250px;
    /*overflow: hidden;*/
    margin: 1.5%;
    float: left;
    text-align: center;
  }
  .faceImgTop img{
    margin: 0 auto;
    height: 200px;
    display: block;
    max-height: 100%;
    max-width: 100%;
    min-width: 65%;
    min-height: 65%;
    border: .5px solid #F1F2F7;
    border-radius: 5px;
  }
  .faceImgBottom {
    width: 90%;
    height: 350px;
    overflow: hidden;
    margin: 2.5%;
    float: left;
    text-align: center;

  }
  .faceImgBottom img{
    margin: 0 auto;
    display: block;
    height: 300px;
    min-width: 80%;
    min-height: 80%;
    border: .5px solid #F1F2F7;
    border-radius: 5px;
  }

  #btnForm{
    width: 90%;
    margin: 0 auto
  }
  #studentsInf td img{
    max-width: 300px;
    max-height: 200px;
  }
  .lastTitle {
    margin-right: 40px;
    float: left;
    font-weight: 400;
    line-height: 40px;
    font-size: 16px;
  }
  .reviewTable {
    width: 60%;
    margin: 0 auto;
  }
  table td img {
    width: 100%;
  }
  .faceImgTop .handleImg {
    width: 40%;
    transform: rotate(-90deg);
    -webkit-transform: rotate(-90deg);
  }
  .vadio {
    float: left;
    margin-left:60px;
    transform: rotate(-180deg);
    -webkit-transform: rotate(-180deg);
  }
  .vadios {
    float: left;
    margin-right:60px;
  }
</style>
